<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test02</title>
</head>
<body>
<script type="text/javascript">
    function Person(name, age) {
        this.name = name;
        this.age = age;
    }

    function Student(school) {
        this.school = school;
    }

    Student.prototype = new Person("zhangsan", 18);

    let stu01 = new Student("abc school");

    let stuProto = Object.getPrototypeOf(stu01);

    stuProto.addr = "xxx-yyy-zzz";

    Object.setPrototypeOf(stu01, stuProto);

    Object.defineProperty(stu01, "grade", {
        enumerable: false,
        value: 80
    });

    stu01[Symbol.for("mmm")] = "nnn";

    console.dir(stu01);

    console.log(8 == '8');
    console.log(8 === '8');

    console.log(NaN === NaN);

    console.log(Object.is(8, '8'));
    console.log(Object.is(NaN, NaN));

    console.dir(Object.values(stu01));
    console.dir(Object.entries(stu01));

    let stu02 = {};

    Object.assign(stu02, stu01);

    console.dir(stu02);

    let {x, y, ...z} = {x: '11', y: '22', a: '33', b: '44'};

    console.dir(z);

    let stu03 = {...stu01};

    console.dir(stu03);
</script>
</body>
</html>